package groupon.user.model;

import groupon.commom.model.StatefulEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;

@Entity
@Table(name = "groupon_actor")
@Inheritance(strategy = InheritanceType.JOINED)
public class Actor extends StatefulEntity{

	private static final long serialVersionUID = 1L;
	public static final String ACTOR_SA = "SA";
    public static final String ACTOR_GA = "GA";
    public static final String ACTOR_BO = "BO";   
    public static final String ACTOR_FO = "FO";
    
    public static final String PROP_ROLE = "role";
    
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	private int id;
	
	
	@Column(name = "role")
    private String role = ACTOR_FO;
    
	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
	/*@Transient
    public boolean isSa() {
        return ACTOR_SA.equalsIgnoreCase(role);
    }

    @Transient
    public boolean isGa() {
        return ACTOR_GA.equalsIgnoreCase(role);
    }

    @Transient
    public boolean isBo() {
        return ACTOR_BO.equalsIgnoreCase(role);
    }

    @Transient
    public boolean isFo() {
        return ACTOR_FO.equalsIgnoreCase(role);
    }
*/

}
